<template>
    <div class="bgf">
        <el-tabs v-model="reviewStatus" class="demo-tabs" >
            <el-tab-pane label="微信支付配置" name="1"></el-tab-pane>
            <el-tab-pane label="支付宝支付配置" name="2"></el-tab-pane>
        </el-tabs>
        <el-form v-show="reviewStatus=='1'" :model="form" label-width="160px" class="padt20 padb30" >
            
            <!-- <el-form-item label="开屏页设置：" >
                <el-upload
                    :headers="{ token: $store.state.token }"
                    style="width:fit-content;"
                    accept="image/*"
                    v-loading="loading"
                    class="avatar-uploader"
                    :before-upload="beforeAvatarUpload"
                    :on-success="(val)=>uploadSuccess(val,'bannerVideo')"
                    name="files"
                    :action="globalUrl"
                    :show-file-list="false"
                >
                    <img v-if="form.bannerVideo" :src="form.bannerVideo" class="avatar" /> 
                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
                </el-upload>
                <div class="col9e lh20 padt10 font12">
                    点击可添加开屏页，开屏页尺寸比例9:16
                </div>
            </el-form-item> -->

            <el-form-item label="开启：" prop="goodsName">
                <el-radio-group v-model="form.radio">
                    <el-radio :label="3">开启</el-radio>
                    <el-radio :label="6">关闭</el-radio>
                </el-radio-group>
            </el-form-item>

            <el-form-item label="Mchid：" prop="goodsName">
                <el-input v-model="form.goodsName" placeholder="请输入" class="w460" />
            </el-form-item>

            <el-form-item label=" Key：" prop="goodsName">
                <el-input v-model="form.goodsName" placeholder="请输入" class="w460" />
            </el-form-item>

            <el-form-item label="微信支付证书密钥：" prop="goodsName">
                <el-input v-model="form.goodsName" placeholder="请输入" class="w460" />
            </el-form-item>

            <el-form-item>
                <el-button class="w140" type="primary" @click="submit" >保存</el-button>
            </el-form-item>

        </el-form>

    </div>
   

</template>
<script>
export default {
    data(){
        return{
            reviewStatus:'1',
            globalUrl: '/api/system/upload/uploadList',
             
            form:{},
            loading: false
        }
    },
    methods:{

         //图片上传成功
        uploadSuccess(val,key){
            // console.log(val,key)
            this.loading = false;
            if(val.status==200){
                let img = this.utils.Decrypt(val.data);
                console.log(img)
                this.form[key] = img[0]
            }
        },

        beforeAvatarUpload(file){
            // console.log(file.type)
            const isLt = file.size / 1024 / 1024 < 3

            if (!isLt) {
                this.$message.warning('选择图片过大，请重新上传！');
            }
            return isLt 
        },
    }
}
</script>
<style lang="scss" scoped>
.manage1{
    padding: 25px 20px;
    .from{
        background: #F2F3F5;
        padding: 24px 16px 4px;
        margin-bottom: 20px;
    }
}
.avatar {
    width: 100px;
    height: 100px;
}
.el-icon.avatar-uploader-icon {
    width: 100px;
    height: 100px;
}
</style>